#include "http.h"
#include <iostream>
using namespace std;

int main()
{
	HttpService http;
	http.init();
	http.ConnectAndCreateRequest("GET", "http://www.baidu.com/");
	BOOL flag = http.SendRequest();
	std::string data;
	http.RecvData(data);
	cout << data << endl;
	data.clear();


//	http.CreateRequest("POST", "/");
//	http.SendRequest("item=ddd&test=Add+Item", strlen("item=ddd&test=Add+Item"));
//	http.RecvData(data);
//	cout << data << endl;
//	data.clear();
	http.Close();
	return 0;
}